<!--
author
-->
<template>
    <div class="author-box" >
        <router-link :to="{name:'author',params:{autId:author.id,autype:autype}}" replace>
            <div class="author-left">
                <img class="head-img" :src= "picHead+author.hostLogo">
            </div>
        <div class="author-right">
            <p class="omit name">{{author.hostCompany}}</p>
            <div class="bottom omit2">
                <span class="desc" v-if="author.hostDesc">{{author.hostDesc}}</span>
            </div>
        </div>
        </router-link>
        <subscrib :author="author" class="sub-box" v-if="this.$route.name!='authors'"></subscrib>
    </div>
</template>

<script>
    import subscrib from '../common/subscrib'
    export default {
        components:{'subscrib':subscrib},
        props: ['author','autype'],
        data(){
            return{
                picHead : this.$store.state.picHead
            }
        },
        mounted() {
            // console.log(this.$route.name)
        },
        method: {
        }
    }
</script>

<style lang="less">
    .author-box {
        clear:both;
        padding:.3733rem  2.6133rem 0 2.4rem;
        position:relative;
        height:1.6533rem;
        .head-img{
            height:1.6533rem;
            width:1.6533rem;
            border-radius:50%;
            position:absolute;
            left:.3733rem;
            top:.3733rem;
        }
        .author-right{
            .name {
                font-size: .426rem;
                color: #333333;
            }
            .bottom{
                font-size: .32rem;
                color: #999999;
            }
        }
        .sub-box{
            position: absolute;
            right: 15px;
            top: 50%;
            margin-top: 7px;
            transform: translateY(-50%);
        }
    }

</style>